﻿<UserControl x:Class="Probel.Ldoc.Views.Controls.PatientCardView"
             
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:conv="clr-namespace:Probel.Ldoc.Views.Converters"
             xmlns:t="clr-namespace:Probel.Ldoc.Views.Properties"
             
             mc:Ignorable="d" >
    <UserControl.Resources>
        <conv:BoolToGenderImageConverter x:Key="BoolToGender"/>
        <conv:BirthdateToAgeConverter x:Key="BirthdateToAge"/>
    </UserControl.Resources>
    <Border BorderThickness="5"
            CornerRadius="5"
            Background="#FFF4F8FC">
        <Border.Effect>
            <DropShadowEffect Color="#FFB6B6B6"/>
        </Border.Effect>
        <DockPanel>
            <Image DockPanel.Dock="Left" 
                       Source="{Binding IsFemale, Converter={StaticResource BoolToGender}}"/>
                   <!--Source="/Probel.Ldoc.Views;component/Images/User.png"/>-->
            <TextBlock DockPanel.Dock="Top"
                       FontWeight="Bold">
                <Run Text="{Binding FirstName}"/>
                <Run Text="{Binding LastName}"/>
            </TextBlock>
            <TextBlock>
                <Run Text="{Binding Birthdate, Converter={StaticResource BirthdateToAge}}"/>
                <Run Text="{x:Static t:Messages.Lbl_Age}"/>
            </TextBlock>
        </DockPanel>
    </Border>
</UserControl>
